package com.ge.boot08rpc.controller;

import com.ge.boot08rpc.service.WebClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * 测试 WebClient 远程访问
 */
@RestController
public class WebClientController {

    @Autowired
    WebClientService webClientService;

    @GetMapping("/testUrl")
    public Mono<String> webClientTest(@RequestParam("param") String param) {
        return webClientService.doQuery(param);
    }
}
